#ifndef __MAT3_H__
#define __MAT3_H__

#include "vec3.h"

namespace libvec
{
  struct dmat3;

  struct mat3
  {
    vec3 v1, v2, v3;

    mat3();
    mat3(dmat3 m);
    mat3(float value);
    mat3(float n11, float n12, float n13,
        float n21, float n22, float n23,
        float n31, float n32, float n33);
    mat3(vec3 u, vec3 v, vec3 w);

    vec3 &operator[](int index);

    mat3 operator=(mat3 m);

    bool operator==(mat3 m);
    bool operator!=(mat3 m);

    mat3 &operator+();
    mat3 &operator-();

    mat3 operator+(mat3 m);
    mat3 operator+=(mat3 m);
    mat3 operator-(mat3 m);
    mat3 operator-=(mat3 m);
    vec3 operator*(vec3 v);
    mat3 operator*(mat3 m);
    mat3 operator*=(mat3 m);
    mat3 operator*(float scale);
    mat3 operator*=(float scale);
    mat3 operator/(float scale);
    mat3 operator/=(float scale);
  };
}

#endif /* __MAT3_H__ */
